import 'package:flutter/material.dart';
import 'package:mobile_app.core/core/presentation/theme/styles.dart';

class CoreTextTheme {
  const CoreTextTheme._internal({
    required this.navigationBarTitle,
    required this.navigationBarButton,
    required this.navigationBarBoldButton,
    required this.tileGroupHeader,
    required this.tileGroupFooter,
    required this.tileTitle,
    required this.destructiveTileTitle,
    required this.tileBoldTitle,
    required this.tileSubtitle,
    required this.tileNavigationIndicatorLabel,
    required this.tilePremiumBadge,
    required this.actionDialogMessage,
    required this.actionDialogAction,
    required this.actionDialogPremiumBadge,
    required this.alertDialogTitle,
    required this.alertDialogMessage,
    required this.alertDialogAction,
    required this.overlayButton,
  });

  factory CoreTextTheme.light({
    required Color primaryColor,
    required Color primaryContrastingColor,
  }) {
    return CoreTextTheme._internal(
      navigationBarTitle: CoreStyles.navigationBarTitleTextStyle.copyWith(
        color: CoreStyles.defaultDarkTextColor,
      ),
      navigationBarButton: CoreStyles.navigationBarButtonTextStyle.copyWith(
        color: primaryColor,
      ),
      navigationBarBoldButton: CoreStyles.navigationBarBoldButtonTextStyle.copyWith(
        color: primaryColor,
      ),
      tileGroupHeader: CoreStyles.tileGroupHeaderTextStyle.copyWith(
        color: CoreStyles.grey4,
      ),
      tileGroupFooter: CoreStyles.tileGroupFooterTextStyle.copyWith(
        color: CoreStyles.grey4,
      ),
      tileTitle: CoreStyles.tileTitleTextStyle.copyWith(
        color: CoreStyles.defaultDarkTextColor,
      ),
      destructiveTileTitle: CoreStyles.tileTitleTextStyle.copyWith(
        color: CoreStyles.lightThemeDefaultDestructiveTextColor,
      ),
      tileBoldTitle: CoreStyles.tileBoldTitleTextStyle.copyWith(
        color: CoreStyles.defaultDarkTextColor,
      ),
      tileSubtitle: CoreStyles.tileSubtitleTextStyle.copyWith(
        color: CoreStyles.grey2,
      ),
      tileNavigationIndicatorLabel: CoreStyles.tileNavigationIndicatorLabelTextStyle.copyWith(
        color: CoreStyles.grey2,
      ),
      tilePremiumBadge: CoreStyles.tilePremiumBadgeTextStyle.copyWith(
        color: primaryContrastingColor,
      ),
      actionDialogMessage: CoreStyles.actionDialogMessageTextStyle.copyWith(
        color: CoreStyles.grey2,
      ),
      actionDialogAction: CoreStyles.actionDialogActionTextStyle.copyWith(
        color: CoreStyles.defaultDarkTextColor,
      ),
      actionDialogPremiumBadge: CoreStyles.actionDialogPremiumBadgeTextStyle.copyWith(
        color: primaryContrastingColor,
      ),
      alertDialogTitle: CoreStyles.alertDialogTitleTextStyle.copyWith(
        color: CoreStyles.defaultDarkTextColor,
      ),
      alertDialogMessage: CoreStyles.alertDialogMessageTextStyle.copyWith(
        color: CoreStyles.defaultDarkTextColor,
      ),
      alertDialogAction: CoreStyles.alertDialogActionTextStyle.copyWith(
        color: CoreStyles.defaultDarkTextColor,
      ),
      overlayButton: CoreStyles.overlayButtonTextStyle.copyWith(
        color: primaryContrastingColor,
      ),
    );
  }

  factory CoreTextTheme.dark({
    required Color primaryColor,
    required Color primaryContrastingColor,
  }) {
    return CoreTextTheme._internal(
      navigationBarTitle: CoreStyles.navigationBarTitleTextStyle.copyWith(
        color: CoreStyles.defaultLightTextColor,
      ),
      navigationBarButton: CoreStyles.navigationBarButtonTextStyle.copyWith(
        color: primaryColor,
      ),
      navigationBarBoldButton: CoreStyles.navigationBarBoldButtonTextStyle.copyWith(
        color: primaryColor,
      ),
      tileGroupHeader: CoreStyles.tileGroupHeaderTextStyle.copyWith(
        color: CoreStyles.grey2,
      ),
      tileGroupFooter: CoreStyles.tileGroupFooterTextStyle.copyWith(
        color: CoreStyles.grey2,
      ),
      tileTitle: CoreStyles.tileTitleTextStyle.copyWith(
        color: CoreStyles.defaultLightTextColor,
      ),
      destructiveTileTitle: CoreStyles.tileTitleTextStyle.copyWith(
        color: CoreStyles.darkThemeDefaultDestructiveTextColor,
      ),
      tileBoldTitle: CoreStyles.tileBoldTitleTextStyle.copyWith(
        color: CoreStyles.defaultLightTextColor,
      ),
      tileSubtitle: CoreStyles.tileSubtitleTextStyle.copyWith(
        color: CoreStyles.grey1,
      ),
      tileNavigationIndicatorLabel: CoreStyles.tileNavigationIndicatorLabelTextStyle.copyWith(
        color: CoreStyles.grey1,
      ),
      tilePremiumBadge: CoreStyles.tilePremiumBadgeTextStyle.copyWith(
        color: primaryContrastingColor,
      ),
      actionDialogMessage: CoreStyles.actionDialogMessageTextStyle.copyWith(
        color: CoreStyles.grey2,
      ),
      actionDialogAction: CoreStyles.actionDialogActionTextStyle.copyWith(
        color: CoreStyles.defaultLightTextColor,
      ),
      actionDialogPremiumBadge: CoreStyles.actionDialogPremiumBadgeTextStyle.copyWith(
        color: primaryContrastingColor,
      ),
      alertDialogTitle: CoreStyles.alertDialogTitleTextStyle.copyWith(
        color: CoreStyles.defaultLightTextColor,
      ),
      alertDialogMessage: CoreStyles.alertDialogMessageTextStyle.copyWith(
        color: CoreStyles.defaultLightTextColor,
      ),
      alertDialogAction: CoreStyles.alertDialogActionTextStyle.copyWith(
        color: CoreStyles.defaultLightTextColor,
      ),
      overlayButton: CoreStyles.overlayButtonTextStyle.copyWith(
        color: primaryContrastingColor,
      ),
    );
  }

  final TextStyle navigationBarTitle;
  final TextStyle navigationBarButton;
  final TextStyle navigationBarBoldButton;

  final TextStyle tileGroupHeader;
  final TextStyle tileGroupFooter;
  final TextStyle tileTitle;
  final TextStyle destructiveTileTitle;
  final TextStyle tileBoldTitle;
  final TextStyle tileSubtitle;
  final TextStyle tileNavigationIndicatorLabel;
  final TextStyle tilePremiumBadge;

  final TextStyle actionDialogMessage;
  final TextStyle actionDialogAction;
  final TextStyle actionDialogPremiumBadge;
  final TextStyle alertDialogTitle;
  final TextStyle alertDialogMessage;
  final TextStyle alertDialogAction;

  final TextStyle overlayButton;
}
